package com.czk.model.responsebilitychain.spring;

import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/10/27 22:18
 */
@Component
@Order(1) // 注入列表是是第1个元素
public class CheckParamFilterObject extends AbstractHandler {
    @Override
    public boolean doFilter(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("参数非空校验");
        this.setName("参数非空校验");
        return true;
    }
    @Override
    public void setName(String name) {
        this.name = name;
    }
}
